#ifndef ESDL_text_h
#define ESDL_text_h

#include "sprite.h" 
#include "draw.h" 
#include <SDL/SDL_ttf.h>

typedef TTF_Font EsdlFont;

/**
 * @brief
 * @param char * path - 
 * @param int fontSize -
 * @param int fontStyle -
 * @return
 */
EsdlFont* esdlLoadTextFont(const char* path, int fontSize, int fontStyle);

/**
 * @brief Close a font and free memory
 * @param TTF_Font * font
 */
void esdlCloseTextFont(EsdlFont* font);

/**
 * @brief This function display a text on a sprite. The render is fast but not very beautiful (without anti-alising)
 * @param Sprite * sprite - The sprite where the text have to be drawn
 * @param char * text - The text to display
 * @param int x - The absissa of the top left corner of the text
 * @param int y - The ordinate of the top left corner of the text
 * @param TTF_Font * font - The font object
 * @param Color color - The color of the text
 */
void esdlDrawText(EsdlSprite* sprite, const char* text, int x, int y, EsdlFont* font, EsdlColor color);

/**
 * @brief This function display a text on a sprite. The render is slower than the renderText function but more beautiful (with anti-alising)
 * @param Sprite * sprite - The sprite where the text have to be drawn
 * @param char * text - The text to display
 * @param int x - The absissa of the top left corner of the text
 * @param int y - The ordinate of the top left corner of the text
 * @param TTF_Font * font - The font object
 * @param Color color - The color of the text
 */
void esdlDrawAntiAliasedText(EsdlSprite* sprite, const char* text, int x, int y, EsdlFont* font, EsdlColor color);

#endif
